package com.ymatou.iapi.withdraw.testcase;

import java.math.BigDecimal;
import java.math.RoundingMode;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import java.util.List;

import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.experimental.categories.Category;

import com.ymatou.iapi.withdraw.parameter.WithDrawInvoiceCreateBean;
import com.ymatou.iapi.withdraw.parameter.applyXloboWithDrawForSellerBean;
import com.ymatou.iapi.withdraw.service.WithDrawInvoiceCreateCall;
import com.ymatou.iapi.withdraw.service.applyXloboWithDrawForSellerCall;
import com.ymt.core.tool.Logger;
import com.ymt.utils.annotation.*;
import com.ymt.utils.tag.*;
import com.ymttest.business.service.AccountCallServiceV2;
import com.ymttest.database.model.withdraw.Ymt_InvoiceFundFlowLog;
import com.ymttest.database.model.withdraw.Ymt_InvoiceFundFlowLogExample;
import com.ymttest.database.model.withdraw.Ymt_InvoiceOperationLog;
import com.ymttest.database.model.withdraw.Ymt_InvoiceOperationLogExample;
import com.ymttest.database.model.withdraw.Ymt_InvoiceSerialSeed;
import com.ymttest.database.model.withdraw.Ymt_InvoiceSerialSeedExample;
import com.ymttest.database.model.withdraw.Ymt_WithDrawIdempotent;
import com.ymttest.database.model.withdraw.Ymt_WithDrawIdempotentExample;
import com.ymttest.database.model.withdraw.Ymt_WithDrawInvoice;
import com.ymttest.database.model.withdraw.Ymt_WithDrawInvoiceExample;
import com.ymttest.database.model.withdraw.Ymt_WithDrawInvoiceXloboLogExample;
import com.ymttest.database.sqlwapper.WithdrawWapper;
import com.ymttest.utils.TestDataManager;
/**
*提现申请综合接口--兼容net提现申请
*FreeMaker Template自动生成代码
*/
@TestSuite
public class Ts_WithDrawInvoiceCreate{
	private static WithDrawInvoiceCreateBean bean;
	private static WithDrawInvoiceCreateCall call;

	Ymt_WithDrawInvoiceExample ymtinvoive=new Ymt_WithDrawInvoiceExample();//提现申请信息主表
	Ymt_InvoiceSerialSeedExample ymtserialseed=new Ymt_InvoiceSerialSeedExample();//单据编号种子表
	Ymt_WithDrawInvoiceXloboLogExample ymtxlobolog=new Ymt_WithDrawInvoiceXloboLogExample();//提现到贝海的日志
	Ymt_InvoiceFundFlowLogExample ymtflowlog=new Ymt_InvoiceFundFlowLogExample();//资金流转操作日志表
	Ymt_InvoiceOperationLogExample ymtoperationlog=new Ymt_InvoiceOperationLogExample();//单据操作日志表
	Ymt_WithDrawIdempotentExample ymtidempotent=new Ymt_WithDrawIdempotentExample();//提现申请幂等键记录表
	applyXloboWithDrawForSellerBean bean2=new applyXloboWithDrawForSellerBean();
	applyXloboWithDrawForSellerCall call2=new applyXloboWithDrawForSellerCall();
	
	WithdrawWapper WithdrawWapper=new WithdrawWapper();
	private final int sellerid=3383;
	private final String sellerName="wesper";
	
	private final int userId=4085;
	private final String userName="lunchzhao";
	private final String alipayAccountNo_user="18621614677";
	private final String alipayAccountName_user="wuwen";
	private final String alipayAccountName_Id_user="9d53eb3a-5867-4334-9735-269156eb7a16";
	
	private final String alipayAccountNo_seller="18621614678";
	private final String alipayAccountName_seller="wuwenseller";
	private final String alipayAccountName_Id_seller="9d53eb3a-5867-4334-9735-269156eb7a26";
	
	@BeforeClass
	public static void setUp() {
		Logger.createResultFile("提现申请综合接口--兼容net提现申请");
	}

	@Before
	public void caseUp() {
		bean=new WithDrawInvoiceCreateBean();
		call=new WithDrawInvoiceCreateCall();
	}

	@AfterClass
	public static void tearDown() {
		Logger.generateResult(call.getOpurl());
	}

	@After
	public void caseDown() {
		Logger.end();
	}
	public String check_AccountType()
	{
		String businessName="";
		switch(bean.getAccountType()){
		case 1:
			businessName="交易";
			break;
		case 15:
			businessName="拼邮溯源专项";
			break;
		case 16:
			businessName="黑五专项";
			break;
		case 17:
			businessName="全球买手专项";
			break;
		case 18:
			businessName="预售活动";
			break;
		case 19://19 直播保证金 20高客单价保证金  这两项是保存传入参数BusinessNo
			businessName=bean.getBusinessNo();
			break;
		case 20:
			businessName=bean.getBusinessNo();
			break;
		case 21:
			businessName="系统内部人民币账户";
			break;
		 default:
			businessName="交易";
		  break;
		}
		return businessName;
	}
	private void check_WithDrawInvoice(String invoiceId) throws InterruptedException
	{
		//1:Ymt_WithDrawInvoice 提现申请信息主表
		Date da = new Date(System.currentTimeMillis());
	    Calendar now = Calendar.getInstance();
	    now.setTime(da);
	    
	    SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMMdd");
	    String date=simpleDateFormat.format(new Date());
	    String y=date.substring(0,4);
	    String m=date.substring(4,6);
	    String d=date.substring(6,8);
	    
		Logger.comment("1:验证数据表 Ymt_WithDrawInvoice 提现申请信息主表");
		ymtinvoive.createCriteria().andWithDrawInvoiceIdEqualTo(invoiceId);
		List<Ymt_WithDrawInvoice> invoivelist = WithdrawWapper.selectYmtWithDrawInvoice(ymtinvoive);
		Logger.verifyEquals(1, invoivelist.size(), "验证申请单据表有数据");
		Logger.verifyEquals(invoiceId.substring(0, 11), "FTX"+y+m+d, "验证申请单据是否正确");
		if(invoivelist.size()>0)
		{
			Ymt_WithDrawInvoice invoive=invoivelist.get(0);
			Logger.verifyEquals(1, invoive.getUserAccountType(), "验证Ymt_WithDrawInvoice数据库中 UserAccountType字段与传入的一致");
			Logger.verifyEquals(bean.getWithDrawAmount().stripTrailingZeros().toPlainString(), invoive.getWithDrawAmount().stripTrailingZeros().toPlainString(), "验证Ymt_WithDrawInvoice数据库中 WithDrawAmount字段与传入的一致");
			//-2,"待提交"  -1,"失效"  0,"待处理"  1,"处理中"  2,"处理失败"  3,"已完成"
			Logger.verifyEquals(0, invoive.getInvoiceStatus(), "验证Ymt_WithDrawInvoice数据库中 InvoiceStatus=0 待处理");
			Logger.verifyEquals(bean.getUserId(), invoive.getUserId(), "验证Ymt_WithDrawInvoice数据库中 UserId字段与传入的一致");
			Logger.verifyEquals(bean.getApplyLoginId(), invoive.getUserLoginId(), "验证Ymt_WithDrawInvoice数据库中 ApplyLoginId字段与传入的一致");
			//1:人名币提人名币 2:人名币提澳元 3:人名币提日元 4:人名币提美元 5:人名币提欧元 6:人名币提英镑 7:人名币提加拿大元 8:人名币提韩元
			Logger.verifyEquals(0, invoive.getWithDrawType(), "验证Ymt_WithDrawInvoice数据库中 WithDrawType字段与传入的一致");
			
			Logger.verifyEquals(true, invoive.getWithDrawTime().toString().length()>0, "验证Ymt_WithDrawInvoice数据库中 WithDrawTime");
			
			//0,"银行" 1,"第三方"  2,"贝海" 3,"B2B"
			Logger.verifyEquals(2, invoive.getReceivableAccountType(), "验证Ymt_WithDrawInvoice数据库中 ReceivableAccountType字段与传入的一致");
			//第三方支付平台账号 如用户使用支付宝或者贝宝进行收款，则此字段为第三方支付平台账号
			Logger.verifyEquals("", invoive.getThirdPartyPlatformAccount(), "验证Ymt_WithDrawInvoice数据库中 ThirdPartyPlatformAccount字段与传入的一致");
			
			Logger.verifyEquals(true, invoive.getApplyTime().toString().length()>0, "验证Ymt_WithDrawInvoice数据库中ApplyTime");
			Logger.verifyEquals(1, invoive.getCurrencyType(), "验证Ymt_WithDrawInvoice数据库中 CurrencyType字段与传入的一致");
			Logger.verifyEquals(bean.getBankAccountNo(), invoive.getBankAccountName(), "验证Ymt_WithDrawInvoice数据库中 BankAccountName字段与传入的一致");
			Logger.verifyEquals("贝海账户", invoive.getBankName(), "验证Ymt_WithDrawInvoice数据库中 BankName字段与传入的一致");
			//0:等待客服审批  1:等待客服审批客服审批拒绝 2:客服审批通过 3:财务审批拒绝 4:财务审批通过 5:拒绝支付 6:同意支付
			Logger.verifyEquals(2, invoive.getApproveStatus(), "验证Ymt_WithDrawInvoice数据库中 ApproveStatus字段与传入的一致");
			
			Logger.verifyEquals(true, invoive.getCreateTime().toString().length()>0, "验证Ymt_WithDrawInvoice数据库中CreateTime");
			Logger.verifyEquals(true, invoive.getUpdateTime().toString().length()>0, "验证Ymt_WithDrawInvoice数据库中UpdateTime");
			Logger.verifyEquals(bean.getRemark(), invoive.getRemark(), "验证Ymt_WithDrawInvoice数据库中Remark");
			//1,"买家PC" 2,"买手PC"  3,"运营后台" 4,"买家App" 5,"买手App" 6,"保证金提现" 7,"码头提现到贝海" 8,"专项保证金" 9,"b2b"
			Logger.verifyEquals(7, invoive.getWithDrawChannel(), "验证Ymt_WithDrawInvoice数据库中WithDrawChannel");
			//-1:作废  0:申请提现  1:提现取消  2:提现拒绝  3:提现成功  4:提现失败
			Logger.verifyEquals(0, invoive.getWithDrawBusinessScene(), "验证Ymt_WithDrawInvoice数据库中WithDrawBusinessScene");
			
			String businessName=check_AccountType();
			Logger.verifyEquals(businessName, invoive.getBusinessName(), "验证Ymt_WithDrawInvoice数据库中BusinessName");
			Logger.verifyEquals(bean.getAccountType(), invoive.getAccountType(), "验证Ymt_WithDrawInvoice数据库中AccountType");
		}
	}
	
	private void check_InvoiceSerialSeed(String invoiceId) throws InterruptedException
	{
		//2:Ymt_InvoiceSerialSeed 单据编号种子表
		Logger.comment("2:验证数据表 Ymt_InvoiceSerialSeed 单据编号种子表");
		Long number=Long.parseLong(invoiceId.substring(11,invoiceId.length()));
		ymtserialseed.createCriteria().andSerialNumberEqualTo(number);
		List<Ymt_InvoiceSerialSeed>  seedList=WithdrawWapper.selectYmtInvoiceSerialSeed(ymtserialseed);
		Logger.verifyEquals(1, seedList.size(), "验证单据字段后8位数是种子");
	}
	
	private void check_InvoiceFundFlowLog(String invoiceId) throws InterruptedException
	{
		//3:Ymt_InvoiceFundFlowLog 资金流转操作日志表 两条数据，一条中间账户，一条贝海账户
		Logger.comment("3:验证数据表 Ymt_InvoiceFundFlowLog 资金流转操作日志表");
		this.ymtflowlog.createCriteria().andInvoiceIdEqualTo(invoiceId);
		List<Ymt_InvoiceFundFlowLog>  flowlogList=WithdrawWapper.selectYmtInvoiceFundFlowLog(ymtflowlog);
		if(flowlogList.get(0).getResultCode().equals("4"))
		     Logger.verifyEquals(4, flowlogList.size(), "验证资金流转操作日志表 有四条数据");
		else
			Logger.verifyEquals(2, flowlogList.size(), "验证资金流转操作日志表 有两条数据");
		
		for(int i=0;i<flowlogList.size();i++)
		{
			Logger.verifyEquals(true, flowlogList.get(i).getFundFlowLogId().length()>0, "验证第"+(i+1)+"条数据库Ymt_InvoiceFundFlowLog 中的字段FundFlowLogId");

			if(flowlogList.get(i).getUserId().toString().equals(bean.getApplyUserId()))
			{
			  Logger.verifyEquals(bean.getApplyUserId(), flowlogList.get(i).getUserId().toString(), "验证第"+(i+1)+"条数据库Ymt_InvoiceFundFlowLog 中的字段UserId");
				//AccountType 1普通人民币账户 21系统内部人民币账户
			  Logger.verifyEquals(bean.getAccountType(), flowlogList.get(i).getAccountType(), "验证第"+(i+1)+"条数据库Ymt_InvoiceFundFlowLog 中的字段AccountType=1 普通人民币账户 ");
			  //OperatorId 1:可用资金出账 2:可用资金入账 3:冻结资金入账 4：冻结资金出账
			  Logger.verifyEquals(2, flowlogList.get(i).getOperatorId(), "验证第"+(i+1)+"条数据库Ymt_InvoiceFundFlowLog 中的字段OperatorId=2 可用资金出账");
			}
			else if(flowlogList.get(i).getUserId().equals(-2009))
			{
			   Logger.verifyEquals(-2009, flowlogList.get(i).getUserId(), "验证第"+(i+1)+"条数据库Ymt_InvoiceFundFlowLog 中的字段UserId");
			   Logger.verifyEquals(21, flowlogList.get(i).getAccountType(), "验证第"+(i+1)+"条数据库Ymt_InvoiceFundFlowLog 中的字段AccountType=21 系统内部人民币账户");
			   Logger.verifyEquals(1, flowlogList.get(i).getOperatorId(), "验证第"+(i+1)+"条数据库Ymt_InvoiceFundFlowLog 中的字段AccountType=2 可用资金入账");
			}
			Logger.verifyEquals(bean.getApplyUserId()==null?"0":String.valueOf(bean.getApplyUserId()), flowlogList.get(i).getOperatorName(), "验证第"+(i+1)+"条数据库Ymt_InvoiceFundFlowLog 中的字段OperatorName");
			Logger.verifyEquals(call.getInvoiceId(), flowlogList.get(i).getInvoiceId(), "验证第"+(i+1)+"条数据库Ymt_InvoiceFundFlowLog 中的字段InvoiceId");
			
			if(flowlogList.get(i).getResultCode().equals("0"))
			{
				Logger.verifyEquals(bean.getWithDrawAmount().stripTrailingZeros().toPlainString(), flowlogList.get(i).getAmount().stripTrailingZeros().toPlainString(), "验证第"+(i+1)+"条数据库Ymt_InvoiceFundFlowLog 中的字段Amount");
				Logger.verifyEquals("0", flowlogList.get(i).getResultCode(), "验证第"+(i+1)+"条数据库Ymt_InvoiceFundFlowLog 中的字段ResultCode=0 操作成功");
				Logger.verifyEquals(true, flowlogList.get(i).getResultMsg().contains("操作成功"), "验证第"+(i+1)+"条数据库Ymt_InvoiceFundFlowLog 中的字段ResultMsg=操作成功");
			}
			else if(flowlogList.get(i).getResultCode().equals("4"))
			{
			  Logger.verifyEquals(bean2.getWithDrawAmount().stripTrailingZeros().toPlainString(), flowlogList.get(i).getAmount().stripTrailingZeros().toPlainString(), "验证第"+(i+1)+"条数据库Ymt_InvoiceFundFlowLog 中的字段Amount");
			  Logger.verifyEquals("4", flowlogList.get(i).getResultCode(), "验证第"+(i+1)+"条数据库Ymt_InvoiceFundFlowLog 中的字段ResultCode=0 操作成功");
			  Logger.verifyEquals(true, flowlogList.get(i).getResultMsg().contains("完全幂等"), "验证第"+(i+1)+"条数据库Ymt_InvoiceFundFlowLog 中的字段ResultMsg=操作成功");
			}
		}
	}
	private void check_InvoiceOperationLog(String invoiceId) throws InterruptedException
	{
		//4:InvoiceOperationLog 单据操作日志表
		Date da = new Date(System.currentTimeMillis());
	    Calendar now = Calendar.getInstance();
	    now.setTime(da);
		Logger.comment("4:验证数据表 InvoiceOperationLog 单据操作日志表");
		ymtoperationlog.createCriteria().andInvoiceIdEqualTo(invoiceId);
		List<Ymt_InvoiceOperationLog>  operationlogList=WithdrawWapper.selectYmtInvoiceOperationLog(ymtoperationlog);
		Logger.verifyEquals(2, operationlogList.size(), "验证Ymt_InvoiceOperationLog表 新增两条数据");

		operationlogList.stream().forEach(a->{
			String json=a.getOperationJson();
			if(a.getOperatorId().equals(-1))
			{
				Logger.verifyEquals("system", a.getOperator(), "验证数据库Ymt_InvoiceOperationLog 中的字段Operator");
				Logger.verifyEquals(3, a.getOperationType(), "验证数据库Ymt_InvoiceOperationLog 中的字段OperationType=3冻结资金入账");
				Logger.verifyEquals(true, json.contains("withDrawInvoiceId="+invoiceId), "验证数据库Ymt_InvoiceOperationLog中OperatorId=-1 字段OperationJson含InvoiceId值");
			}
			else
			{
				Logger.verifyEquals(this.sellerName, a.getOperator(), "验证数据库Ymt_InvoiceOperationLog 中的字段Operator");
				Logger.verifyEquals(1, a.getOperationType(), "验证数据库Ymt_InvoiceOperationLog 中的字段OperationType=1可用资金入账");

				Logger.verifyEquals(true, json.contains("withDrawInvoiceId="+invoiceId), "验证数据库Ymt_InvoiceOperationLog中的字段OperationJson含InvoiceId值");
				Logger.verifyEquals(true, json.contains("userAccountType=1"), "验证数据库Ymt_InvoiceOperationLog中的字段OperationJson含userAccountType值");
				Logger.verifyEquals(true, json.contains("withDrawAmount="+bean.getWithDrawAmount().setScale(2, RoundingMode.CEILING)), "验证数据库Ymt_InvoiceOperationLog中的字段OperationJson含WithDrawAmount值");
				Logger.verifyEquals(true, json.contains("invoiceStatus=0"), "验证数据库Ymt_InvoiceOperationLog中的字段OperationJson含invoiceStatus值");
				Logger.verifyEquals(true, json.contains("userId="+bean.getUserId()), "验证数据库Ymt_InvoiceOperationLog中的字段OperationJson含ApplyUserId值");
				Logger.verifyEquals(true, json.contains("userLoginId="+bean.getApplyLoginId()), "验证数据库Ymt_InvoiceOperationLog中的字段OperationJson含ApplyLoginId值");
				Logger.verifyEquals(true, json.contains("bankAccountName="+bean.getBankAccountNo()), "验证数据库Ymt_InvoiceOperationLog中的字段OperationJson含XloboAccountNo值");
				Logger.verifyEquals(true, json.contains("bankName=贝海账户"), "验证数据库Ymt_InvoiceOperationLog中的字段OperationJson含bankName值");
				Logger.verifyEquals(true, json.contains("approveStatus=0"), "验证数据库Ymt_InvoiceOperationLog中的字段OperationJson含approveStatus值");
				Logger.verifyEquals(true, json.contains("remark="+bean.getRemark()), "验证数据库Ymt_InvoiceOperationLog中的字段OperationJson含Remark值");
				Logger.verifyEquals(true, json.contains("withDrawChannel=7"), "验证数据库Ymt_InvoiceOperationLog中的字段OperationJson含withDrawChannel值 码头提现到贝海");
				
				String businessName=check_AccountType();
				Logger.verifyEquals(true, json.contains("businessName="+businessName), "验证数据库Ymt_InvoiceOperationLog中的字段OperationJson含businessName值 提现业务名称");
				Logger.verifyEquals(true, json.contains("accountType="+bean.getAccountType()), "验证数据库Ymt_InvoiceOperationLog中的字段OperationJson含accountType值 提现业务类型");
			}
			//-1:全部（仅查询使用） 1:扣款单 2:调解退款单 3:充值单 4:备用金单 5:冻结单 6:解冻单 7:提现单 8:保证金退款单 9:自有账户充值单据 10:财务调整单据 
			//11:商家日账单 12:补贴申请单  13:系统差异调整单 14:提现账户 15: 优惠券回收单据 16:预充值
			Logger.verifyEquals(7, a.getInvoiceType(), "验证数据库Ymt_InvoiceOperationLog 中的字段InvoiceType=7 提现");
			Logger.verifyEquals(true, a.getOperationTime().toString().length()>0, "验证Ymt_WithDrawInvoice数据库中OperationTime");
		});
	}
	private void Ymt_WithDrawIdempotent(String invoiceId) throws InterruptedException
	{
		Logger.comment("5:验证数据表 Ymt_WithDrawIdempotent 提现申请幂等键记录表");
		ymtidempotent.createCriteria().andWithDrawInvoiceIdEqualTo(invoiceId);
		List<Ymt_WithDrawIdempotent>   idempotentList=WithdrawWapper.selectYmtWithDrawIdempotent(ymtidempotent);
		Logger.verifyEquals(1, idempotentList.size(), "验证幂等表Ymt_WithDrawIdempotent 有数据");
	}
	private  void check_verify() throws InterruptedException
	{
		Logger.verifyEquals("true", call.getSuccess(), "验证返回为true");
		Logger.verifyEquals("200", call.getCode(), "验证返回为200");
		Logger.verifyEquals(true, call.getTraceTime().length()>0, "验证TraceTime不为空");
		String invoiceId=call.getInvoiceId();
		check_WithDrawInvoice(invoiceId);
		check_InvoiceSerialSeed(invoiceId);
		check_InvoiceFundFlowLog(invoiceId);
		check_InvoiceOperationLog(invoiceId);
		Ymt_WithDrawIdempotent(invoiceId);
		
	}
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_WithDrawInvoiceCreate_001() {
		Logger.start(true,"正例-提现申请综合接口--兼容net提现申请-receivableAccountType=2,贝海");
		try {
			//给帐号充值
			String accountid = AccountCallServiceV2.getAccountId(sellerid, 1);
			AccountCallServiceV2.resetAccount(accountid, new BigDecimal(999999),
					new BigDecimal(0));
			
            bean.setUserId(sellerid);
            bean.setAccountType(1);//用户类型(0买家，１买手）
            bean.setWithDrawAccountType(1);//买手提现帐户类型:　1普通人民币账户 RmbAccount,15 拼邮溯源专项保证金,16 黑五专项保证金, 17 全球买手专项保证金,18 预售活动保证金,  19 直播保证金, 20 高客单价保证金中间帐户:　21 系统内部人民币账户
            bean.setWithDrawAmount(new BigDecimal(5));
            bean.setBusinessNo(new TestDataManager().getRandomNum(8));
            bean.setRemark("测试提现到贝海");
            bean.setApplyUserId(3383);
            bean.setApplyLoginId("wesper");
            bean.setBankAccountName("testaccount1");
            bean.setBankAccountNo("testaccount1");
            bean.setCurrencyType(1);
            bean.setFundAccountId("");
            bean.setReceivableAccountType(2);//收款帐户类型 0 银行,1 支付宝第三方,2 贝海帐户,3 B2B帐户
            bean.setIdempotentNo(new TestDataManager().getRandomNum(8));
            
			call.setData(bean);
			call.callService();			
			//验证
			//check_verify();
				
			
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_WithDrawInvoiceCreate_001_1() {
		Logger.start(true,"正例-提现申请综合接口--兼容net提现申请-receivableAccountType=1,支付宝第三方");
		try {
			//TODO 补全case代码
			org.junit.Assert.fail();
			call.setData(bean);
			call.callService();			
			
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_WithDrawInvoiceCreate_001_2() {
		Logger.start(true,"正例-提现申请综合接口--兼容net提现申请-receivableAccountType=2,贝海帐号");
		try {
			//TODO 补全case代码
			org.junit.Assert.fail();
			call.setData(bean);
			call.callService();			
			
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_WithDrawInvoiceCreate_001_3() {
		Logger.start(true,"正例-提现申请综合接口--兼容net提现申请-receivableAccountType=3,B2B帐户");
		try {
			//TODO 补全case代码
			org.junit.Assert.fail();
			call.setData(bean);
			call.callService();			
			
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_WithDrawInvoiceCreate_002() {
		Logger.start(true,"正例-提现申请综合接口--兼容net提现申请-accountTypeId=1,普通人民币账户");
		try {
			//TODO 补全case代码
			org.junit.Assert.fail();
			call.setData(bean);
			call.callService();			
			
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_WithDrawInvoiceCreate_002_1() {
		Logger.start(true,"正例-提现申请综合接口--兼容net提现申请-accountTypeId=15,拼邮溯源专项保证金");
		try {
			//TODO 补全case代码
			org.junit.Assert.fail();
			call.setData(bean);
			call.callService();			
			
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_WithDrawInvoiceCreate_003() {
		Logger.start(true,"正例-提现申请综合接口--兼容net提现申请-accountTypeId=16,黑五专项保证金");
		try {
			//TODO 补全case代码
			org.junit.Assert.fail();
			call.setData(bean);
			call.callService();			
			
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_WithDrawInvoiceCreate_004() {
		Logger.start(true,"正例-提现申请综合接口--兼容net提现申请-accountTypeId=17,全球买手专项保证金");
		try {
			//TODO 补全case代码
			org.junit.Assert.fail();
			call.setData(bean);
			call.callService();			
			
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_WithDrawInvoiceCreate_005() {
		Logger.start(true,"正例-提现申请综合接口--兼容net提现申请-accountTypeId=18,预售活动保证金");
		try {
			//TODO 补全case代码
			org.junit.Assert.fail();
			call.setData(bean);
			call.callService();			
			
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_WithDrawInvoiceCreate_006() {
		Logger.start(true,"正例-提现申请综合接口--兼容net提现申请-accountTypeId=19,直播保证金");
		try {
			//TODO 补全case代码
			org.junit.Assert.fail();
			call.setData(bean);
			call.callService();			
			
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_WithDrawInvoiceCreate_007() {
		Logger.start(true,"正例-提现申请综合接口--兼容net提现申请-accountTypeId=20,高客单价保证金");
		try {
			//TODO 补全case代码
			org.junit.Assert.fail();
			call.setData(bean);
			call.callService();			
			
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_WithDrawInvoiceCreate_008() {
		Logger.start(true,"反例-提现申请综合接口--兼容net提现申请-提现金额小于最小可提现金额(人民币提现金额不能少于手续费5元)");
		try {
			//TODO 补全case代码
			org.junit.Assert.fail();
			call.setData(bean);
			call.callService();			
			
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_WithDrawInvoiceCreate_009() {
		Logger.start(true,"反例-提现申请综合接口--兼容net提现申请-提现金额大于最大可提现金额(外币提现金额不能少于6000元)");
		try {
			//TODO 补全case代码
			org.junit.Assert.fail();
			call.setData(bean);
			call.callService();			
			
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_WithDrawInvoiceCreate_010() {
		Logger.start(true,"反例-提现申请综合接口--兼容net提现申请-专项帐户提现无手续费金额大于0可提现");
		try {
			//TODO 补全case代码
			org.junit.Assert.fail();
			call.setData(bean);
			call.callService();			
			
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_WithDrawInvoiceCreate_011() {
		Logger.start(true,"反例-提现申请综合接口--兼容net提现申请-提现到贝海和提现到b2b平台无手续费,提现金额不能少于5元");
		try {
			//TODO 补全case代码
			org.junit.Assert.fail();
			call.setData(bean);
			call.callService();			
			
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_WithDrawInvoiceCreate_012() {
		Logger.start(true,"反例-提现申请综合接口--兼容net提现申请-idempotentNo重复提交");
		try {
			//TODO 补全case代码
			org.junit.Assert.fail();
			call.setData(bean);
			call.callService();			
			
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_WithDrawInvoiceCreate_013() {
		Logger.start(true,"反例-提现申请综合接口--兼容net提现申请-贝海帐户未与买手帐号绑定");
		try {
			//TODO 补全case代码
			org.junit.Assert.fail();
			call.setData(bean);
			call.callService();			
			
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_WithDrawInvoiceCreate_014() {
		Logger.start(true,"反例-提现申请综合接口--兼容net提现申请-sellerid为空");
		try {
			//TODO 补全case代码
			org.junit.Assert.fail();
			call.setData(bean);
			call.callService();			
			
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_WithDrawInvoiceCreate_015() {
		Logger.start(true,"反例-提现申请综合接口--兼容net提现申请-accountTypeId为空");
		try {
			//TODO 补全case代码
			org.junit.Assert.fail();
			call.setData(bean);
			call.callService();			
			
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_WithDrawInvoiceCreate_016() {
		Logger.start(true,"反例-提现申请综合接口--兼容net提现申请-withDrawAmount为空");
		try {
			//TODO 补全case代码
			org.junit.Assert.fail();
			call.setData(bean);
			call.callService();			
			
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_WithDrawInvoiceCreate_017() {
		Logger.start(true,"反例-提现申请综合接口--兼容net提现申请-businessNo为空");
		try {
			//TODO 补全case代码
			org.junit.Assert.fail();
			call.setData(bean);
			call.callService();			
			
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_WithDrawInvoiceCreate_018() {
		Logger.start(true,"反例-提现申请综合接口--兼容net提现申请-remark为空");
		try {
			//TODO 补全case代码
			org.junit.Assert.fail();
			call.setData(bean);
			call.callService();			
			
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_WithDrawInvoiceCreate_019() {
		Logger.start(true,"反例-提现申请综合接口--兼容net提现申请-applyUserId为空");
		try {
			//TODO 补全case代码
			org.junit.Assert.fail();
			call.setData(bean);
			call.callService();			
			
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_WithDrawInvoiceCreate_020() {
		Logger.start(true,"反例-提现申请综合接口--兼容net提现申请-applyLoginId为空");
		try {
			//TODO 补全case代码
			org.junit.Assert.fail();
			call.setData(bean);
			call.callService();			
			
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_WithDrawInvoiceCreate_022() {
		Logger.start(true,"反例-提现申请综合接口--兼容net提现申请-b2bAccountNo为空");
		try {
			//TODO 补全case代码
			org.junit.Assert.fail();
			call.setData(bean);
			call.callService();			
			
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_WithDrawInvoiceCreate_023() {
		Logger.start(true,"反例-提现申请综合接口--兼容net提现申请-currencyType为空");
		try {
			//TODO 补全case代码
			org.junit.Assert.fail();
			call.setData(bean);
			call.callService();			
			
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_WithDrawInvoiceCreate_023_1() {
		Logger.start(true,"反例-提现申请综合接口--兼容net提现申请-fundAccountId不存在");
		try {
			//TODO 补全case代码
			org.junit.Assert.fail();
			call.setData(bean);
			call.callService();			
			
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_WithDrawInvoiceCreate_023_2() {
		Logger.start(true,"反例-提现申请综合接口--兼容net提现申请-currencyType不存在");
		try {
			//TODO 补全case代码
			org.junit.Assert.fail();
			call.setData(bean);
			call.callService();			
			
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_WithDrawInvoiceCreate_024() {
		Logger.start(true,"正例-提现申请综合接口--兼容net提现申请-idempotentNo为空无幂等逻辑(需要重点验证单据号后面的序号)");
		try {
			//TODO 补全case代码
			org.junit.Assert.fail();
			call.setData(bean);
			call.callService();			
			
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
}